//2009/07/31 11:28:29
#include <iostream>
#include <string>
#include <vector>

using namespace std;

class PaternityTest
{
public:
    vector <int> possibleFathers(string child, string mother, vector <string> men)
    {
        vector<int> v;
        v.clear();
        for (int i=0; i<men.size(); i++)
        {
            if (isFather(child, mother, men[i]))
                v.push_back(i);
        }
        return v;
    }
private:
    bool isFather(string child, string mother, string father)
    {
        int match =0;
        for (int i=0; i<child.size(); i++)
        {
            if (child.at(i) == father.at(i))
                match++;
            else if (child.at(i) != mother.at(i))
                return false;
        }
        return match >= child.size()/2;
    }
};
